﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.IO;
using System.Linq;
using System.Text;

namespace MEF_Import_And_Export
{
    public class Program
    {
        //[Import]
        //public D d { get; set; }

        [Import]
        public ID id { get; set; }


        static void Main(string[] args)
        {
            Program p = new MEF_Import_And_Export.Program();
            p.Run();
            Console.ReadKey();
        }

        public void Run()
        {
            var catalog = new AssemblyCatalog(typeof(Program).Assembly);
            var container = new CompositionContainer(catalog);
            container.ComposeParts(this);

           // Console.WriteLine(ic.Value.GetType());
           // Console.WriteLine(iclist.FirstOrDefault().GetType());
        }
    }
}